package com.lyjilu.model.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;


/**
 * The persistent class for the pop_group database table.
 * 
 */
@Entity
@Table(name="pop_group")
public class PopGroup implements Serializable {
	private static final long serialVersionUID = 1L;
	private long id;
	private Date creTime;
	private String name;
	private BigDecimal parentId;
	private String remark;
	private Set<PopGroupPopedom> popGroupPopedoms;
	private Set<PopGroupRole> popGroupRoles;
	private Set<PopUserGroup> popUserGroups;

    public PopGroup() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(unique=true, nullable=false, precision=10)
	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}


    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="cre_time")
	public Date getCreTime() {
		return this.creTime;
	}

	public void setCreTime(Date creTime) {
		this.creTime = creTime;
	}


	@Column(length=64)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}


	@Column(name="parent_id", precision=10)
	public BigDecimal getParentId() {
		return this.parentId;
	}

	public void setParentId(BigDecimal parentId) {
		this.parentId = parentId;
	}


	@Column(length=128)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}


	//bi-directional many-to-one association to PopGroupPopedom
	@OneToMany(mappedBy="popGroup")
	public Set<PopGroupPopedom> getPopGroupPopedoms() {
		return this.popGroupPopedoms;
	}

	public void setPopGroupPopedoms(Set<PopGroupPopedom> popGroupPopedoms) {
		this.popGroupPopedoms = popGroupPopedoms;
	}
	

	//bi-directional many-to-one association to PopGroupRole
	@OneToMany(mappedBy="popGroup")
	public Set<PopGroupRole> getPopGroupRoles() {
		return this.popGroupRoles;
	}

	public void setPopGroupRoles(Set<PopGroupRole> popGroupRoles) {
		this.popGroupRoles = popGroupRoles;
	}
	

	//bi-directional many-to-one association to PopUserGroup
	@OneToMany(mappedBy="popGroup")
	public Set<PopUserGroup> getPopUserGroups() {
		return this.popUserGroups;
	}

	public void setPopUserGroups(Set<PopUserGroup> popUserGroups) {
		this.popUserGroups = popUserGroups;
	}
	
}